home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / vdi.arc / VDICTEXT.C next >
Encoding:
Text File  |  1985-05-01  |  1.1 KB  |  48 lines

  1. /*
  2.  *  Program to output 10 pages of text
  3.  *  using the VDI cursor text features.
  4.  */
  5.  
  6. main()
  7. {
  8. int  workout[66];
  9. int  dev_handle;
  10. int  i,j;
  11. char input_string[2];
  12.  
  13. static int   echo_xy[] = {0, 0};
  14. static int   workin[] = {0,0,0,0,0,0,0,0,0,0,
  15.                          0,'D','I','S','P','L','A','Y',' '};
  16.  
  17.     /* initialize the device and put characteristics in workout */
  18.     v_opnwk(workin,&dev_handle,workout);
  19.  
  20.     /* enter cursor text mode */
  21.     v_enter_cur(dev_handle);
  22.  
  23.     for (i = 1; i <= 10; ++i) {
  24.  
  25.         for (j = 1; j <= 25; ++j) {
  26.  
  27.             /* specify direct cursor address */
  28.             vs_curaddress(dev_handle,j,1);
  29.  
  30.             /* output cursor addressable text */
  31.             v_curtext(dev_handle,
  32.                       "This is a test of the VDI cursor text.  ");
  33.             v_curtext(dev_handle,
  34.                       "This is a test of the VDI cursor text.  ");
  35.         }
  36.  
  37.         /* move cursor home */
  38.         v_curhome(dev_handle);
  39.  
  40.         /* erase to end of screen */
  41.         v_eeos(dev_handle);
  42.     }
  43.  
  44.     /* close workstation */
  45.     v_clswk(dev_handle);
  46.  
  47. }
  48.